object_forall (object, child_callback, &data);
}
+static void
+block_selection_changed (GtkInspectorObjectTree *wt)
+{
+ GtkTreeSelection *selection;
+
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (wt->priv->tree));
+ g_signal_handlers_block_by_func (selection, on_selection_changed, wt);
+}
+
+static void
+unblock_selection_changed (GtkInspectorObjectTree *wt)
+{
+ GtkTreeSelection *selection;
+
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (wt->priv->tree));
+ g_signal_handlers_unblock_by_func (selection, on_selection_changed, wt);
+}
+
gboolean
select_object_internal (GtkInspectorObjectTree *wt,
GObject *object,
path = gtk_tree_model_get_path (GTK_TREE_MODEL (wt->priv->model), &iter);
gtk_tree_view_expand_to_path (GTK_TREE_VIEW (wt->priv->tree), path);
if (!activate)
- g_signal_handlers_block_by_func (selection, on_selection_changed, wt);
+ block_selection_changed (wt);
gtk_tree_selection_select_iter (selection, &iter);
if (!activate)
- g_signal_handlers_unblock_by_func (selection, on_selection_changed, wt);
+ unblock_selection_changed (wt);
gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (wt->priv->tree), path, NULL, TRUE, 0.5, 0);
if (activate)
GdkScreen *screen;
GObject *selected;
+ block_selection_changed (wt);
+
selected = gtk_inspector_object_tree_get_selected (wt);
clear_store (wt);
if (selected)
select_object_internal (wt, selected, FALSE);
+
+ unblock_selection_changed (wt);
}
static gboolean